Add more debugging info to which-key--create-pages
authorJustin Burkett <justin@burkett.cc>
Sat, 13 Apr 2024 19:56:34 +0000 (15:56 -0400)
committerJustin Burkett <justin@burkett.cc>
Sat, 13 Apr 2024 19:56:34 +0000 (15:56 -0400)
which-key.el

index 7d859a90bc67b636f20b85187b0f9005182fb99b..beb111211a8923a717e742063a6c24288f4d5660 100644 (file)
@@ -2124,11 +2124,36 @@ is the width of the live window."
         ;; `which-key-allow-imprecise-window-fit' is non-nil.
         (setf (which-key--pages-height result) which-key-min-display-lines))
       (which-key--debug-message "Frame height: %s
+Frame pixel width: %s
+Frame char width: %s
+Frame width: %s
+Which-key initial width: %s
+Which-key adjusted width: %s
 Minibuffer height: %s
-Max dimensions: (%s,%s)
-Available for bindings: (%s,%s)
-Actual lines: %s" (frame-height) (window-text-height (minibuffer-window))
-max-lines max-width avl-lines avl-width (which-key--pages-height result))
+Max dimensions: (%s, %s)
+Available for bindings: (%s, %s)
+Popup type info: (%s, %s, %s)
+Computed page widths: %s
+Actual lines: %s"
+                                (frame-height)
+                                (frame-pixel-width)
+                                (frame-char-width)
+                                (window-total-width (frame-root-window))
+                                (which-key--width-or-percentage-to-width
+                                  which-key-side-window-max-width)
+                                (which-key--total-width-to-text
+                                 (which-key--width-or-percentage-to-width
+                                  which-key-side-window-max-width))
+                                (window-text-height (minibuffer-window))
+                                max-lines
+                                max-width
+                                avl-lines
+                                avl-width
+                                which-key-popup-type
+                                which-key-side-window-location
+                                which-key-side-window-max-width
+                                (which-key--pages-widths result)
+                                (which-key--pages-height result))
       result)))
 
 (defun which-key--lighter-status ()